﻿<UserControl x:Class="LockCrypt.FieldEditor"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:loc="clr-namespace:LockCrypt"
    xmlns:lex="http://schemas.root-project.org/xaml/presentation" Loaded="UserControl_Loaded"
    xmlns:l49ui="clr-namespace:Lime49.UI;assembly=Lime49">
    <UserControl.CommandBindings>
        <CommandBinding Command="ApplicationCommands.Delete" Executed="DeleteField"/>
        <CommandBinding Command="ApplicationCommands.New" Executed="AddField" />
        <CommandBinding Command="ApplicationCommands.Properties" Executed="RenameField"/>
        <CommandBinding Command="NavigationCommands.GoToPage" Executed="MoveField" CanExecute="CanMoveField" />
        <CommandBinding Command="loc:LockCryptCommands.GeneratePassword" Executed="GeneratePassword" />
        <CommandBinding Command="loc:LockCryptCommands.MarkAsUrl" Executed="MarkAsUrl" />
        <CommandBinding Command="loc:LockCryptCommands.MarkAsPassword" Executed="MarkAsPassword" />
        <CommandBinding Command="loc:LockCryptCommands.MarkAsPhone" Executed="MarkAsPhone" />
    </UserControl.CommandBindings>
    <UserControl.Resources>
        <BitmapImage x:Key="settings_16" UriSource="pack://application:,,,/Resources/Images/settings_16.png" x:Shared="true" />
    </UserControl.Resources>
    <DockPanel LastChildFill="True">
        <l49ui:ImageButton DockPanel.Dock="Bottom" Command="ApplicationCommands.New" Text="{lex:LocText LockCrypt.Core:Strings:AddField}" 
                         Image="pack://application:,,,/Resources/Images/add_16.png" ImageLocation="Left" HorizontalAlignment="Right"/>
        <Grid x:Name="grdFields" DockPanel.Dock="Top">
            <!--Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions-->
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" SharedSizeGroup="labels" />
                <ColumnDefinition Width="*"/>
                <!--ColumnDefinition Width="Auto"/-->
            </Grid.ColumnDefinitions>
        </Grid>
    </DockPanel>
</UserControl>
